package ooday04;

import com.sun.xml.internal.ws.api.model.wsdl.WSDLOutput;

/** static 的演示 */
public class StaticDemo {
    public static void main(String[] args) {
        StaticVar o1 = new StaticVar();
        o1.show();
        StaticVar o2 = new StaticVar();
        o2.show();
        StaticVar o3= new StaticVar();
        o3.show();
        System.out.println(StaticVar.b);  //常常通过类名点来访问


        StaticBlock o4 = new StaticBlock();  //先走静态块，在走构造方法，静态块（类）只走一次，构造方法有几次走几次
        StaticBlock o5 = new StaticBlock();
        StaticBlock o6 = new StaticBlock();

    }
}